/* eslint-disable react/destructuring-assignment */
import React, { useEffect } from "react";
import { Layout } from "antd";
import { renderRoutes } from "react-router-config";
import BlogHeader from "./components/Header";
import { renderCartoon } from "../lib/utils";
import "./CSS/App.less";

function App(props: any) {
    useEffect(() => {
        renderCartoon();
    }, []);
    return (
        <Layout id="app-container">
            <BlogHeader />
            { renderRoutes(props.route.routes) }
        </Layout>
    );
}

export default App;
